<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>客户发票</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rcpt/tRcpt/">客户发票信息列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="TRcpt" action="${ctx}/rcpt/tRcpt/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div>
		<label>申请日期：</label>
				<input name="createDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${tRcpt.createDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>

		<label>申请人：</label>
				<form:input path="createBy.id"  maxlength="50"  class="input-medium"/>
	
		<label>状态：</label>
			<form:select path="rcptStatus" class="input-large">
				<option value="">请选择</option>
				<form:options items="${fns:getDictList('rcptstatus')}"
						itemLabel="label" itemValue="value" htmlEscape="false" />
			</form:select>

			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>发票抬头</th>
				<th>开票金额</th>
				<th>税号</th>
				<th>发票内容</th>
				<th>超公里费</th>
				<th>超时长费</th>
				<th>司机食宿</th>
				<th>申请时间</th>
				<th>申请人</th>
				<th>收件人</th>
				<th width="15%">收件地址</th>
				<th>联系电话</th>
				<th>邮编</th>
				<th>状态</th>				
				<shiro:hasPermission name="rcpt:tRcpt:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tRcpt">
			<tr>
				<td>
					${tRcpt.title}
				</td>
				<td>
					${tRcpt.rcptamount+tRcpt.totalOutkmsfee+tRcpt.totalOuttimefee+tRcpt.totalRirverfee}
				</td>
				<td>
					${tRcpt.dutyParagraph}
				</td>
				<td>
					${tRcpt.content}
				</td>
				<td>
					${tRcpt.totalOutkmsfee}
				</td>
				<td>
					${tRcpt.totalOuttimefee}
				</td>
				<td>
					${tRcpt.totalRirverfee}
				</td>
				<td>
					<fmt:formatDate value="${tRcpt.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${tRcpt.createBy.name}
				</td>
				<td>
					${tRcpt.receiver}
				</td>
				<td>
					${tRcpt.address}
				</td>
				<td>
					${tRcpt.mobile}
				</td>
				<td>
					${tRcpt.postcode}
				</td>
				<td>
					${fns:getDictLabel(tRcpt.rcptStatus, 'rcptstatus', '无')}
				</td>
				<td>
 <%--    				<a href="${ctx}/rcpt/tRcpt/form?id=${tRcpt.id}">查看</a> --%>
    				<c:if test="${tRcpt.rcptStatus == 1}">
    				<a href="${ctx}/rcpt/tRcpt/confirm?id=${tRcpt.rcptid}" onclick="return confirmx('该发票是否已经确认开票？', this.href)">确认开票</a>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>